<?php if (!defined('BASEPATH'))exit('No direct script access allowed');
/**
 * 关于我们模块控制器
 */
class About extends MY_Controller {

    function __construct() {
        parent::__construct();
        $this->load->model('content_model');
        $this->load->model('cate_model');
    }
    //关于我们
    function index() {
        $where = array();
        $where['group'] = 'onepage';
        $where['code'] = 'index';
        $where['hide'] = 0;
        $cate = $this->cate_model->content_cate_get($where);
        $item = $this->content_model->get(array('cate_id'=>$cate['id'],'status'=>1));
        $item['content'] = strstr($item['content'],"http://") ? $item['content'] : str_replace('<img src="', '<img src="'.$this->img_url, $item['content']);
        $this->assign('item', $item);
        $this->display('about/index.html');
    }
    //联系我们
    function contact(){
        
        $this->display('about/contact.html');
    }
    //联系我们
    function cooperation(){
        $this->display('about/cooperation.html');
    }
    function parnter(){
        //合作机构
        $partners = $this->db->select('*')->from('partners')->where(array('is_show'=>1))->order_by("sort", "asc")->limit(20, 0)->get()->result_array();
        $finance = $this->db->select('*')->from('partners')->where(array('is_show'=>0))->order_by("sort", "asc")->limit(20, 0)->get()->result_array();

        $this->assign("partners", $partners);
        $this->assign("finance", $finance);
        $this->display('about/parnter.html');
    }
    //用户注册协议
    function agreement(){
        $this->display('about/agreement.html');
    }
    //隐私声明
    function secret(){
        $this->display('about/secret.html');
    }
}
